package com.ts.auth.feign.fallback;

import com.ts.auth.feign.UserFeignClient;
import com.ts.auth.pojo.dto.userOrg.TbPermission;
import com.ts.auth.pojo.dto.userOrg.TbUser;
import com.ts.common.pojo.resp.TResponse;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class UserFeignClientFallback implements UserFeignClient {
    @Override
    public TResponse<TbUser> getByName(String name) {

        return TResponse.error("fail to link user-org server to getByName ::" + name);
    }

    @Override
    public TResponse<List<TbPermission>> getPermissionByUserId(Long id) {
        return TResponse.error("fail to link user-org server to getPermissionByUserId ::" + id);
    }
}
